<%@ page import="java.util.Hashtable"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.Enumeration"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="projects.project" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<jsp:useBean id="getEmployees" class="projects.project"></jsp:useBean>
<jsp:setProperty property="*" name="getEmployees"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
	project searchUser = new project();
	Hashtable<Integer, String> returnedEmployees = new Hashtable<Integer, String>();
	returnedEmployees = searchUser.queryEmployees(request.getParameter("search"));
	Enumeration<Integer> keysEnum = returnedEmployees.keys();
	
	ArrayList<Integer> keys = new ArrayList<Integer>();
	while(keysEnum.hasMoreElements()){
		keys.add(keysEnum.nextElement());
	}
	
	for(Integer key : keys){
		out.println(returnedEmployees.get(key) + "," + key);
	}
%>
</body>
</html>